package com.sansi.bleFloodlight.utils;

import android.bluetooth.BluetoothDevice;

import com.a1anwang.okble.client.scan.BLEScanResult;
import com.alibaba.android.arouter.launcher.ARouter;

import java.util.ArrayList;

public class RouterPath {
    public static final String tabPath = "/tab/activity";
    public static final String bleSearchPath = "/bleSearch/activity";
    public static final String bleConnectPath = "/bleConnect/activity";
    public static final String bleConnectFailPath = "/bleConnectFail/activity";
    public static final String AppInfoPath = "/appInfo/activity";
    public static final String lightClosePath = "/lightClose/activity";
    public static final String deviceInfoPath = "/deviceInfo/activity";
    public static final String timePath = "/time/activity";
    public static final String createTimePath = "/createTime/activity";
    public static final String firmwareUpdatePath = "/firmwareUpdate/activity";
    public static final String addGroupPath = "/addGroup/activity";

    public static void gotoTab() {
        ARouter.getInstance().build(tabPath).navigation();
    }

    public static void gotoBleSearchPath() {
        ARouter.getInstance().build(bleSearchPath).navigation();
    }

    public static void gotoBleConnectPath(ArrayList<BLEScanResult> list) {
        ARouter.getInstance().build(bleConnectPath).withParcelableArrayList("deviceList", list).navigation();
    }

    public static void gotoBleConnectFailPath() {
        ARouter.getInstance().build(bleConnectFailPath).navigation();
    }

    public static void gotoAppInfoPath() {
        ARouter.getInstance().build(AppInfoPath).navigation();
    }

    public static void gotoLightClosePathPath(BluetoothDevice bleDevice, int color, int progress) {
        ARouter.getInstance().build(lightClosePath)
                .withParcelable("device", bleDevice).withInt("color", color).withInt("progress", progress)
                .navigation();
    }

    public static void gotoDeviceInfoPath(BluetoothDevice device) {
        ARouter.getInstance().build(deviceInfoPath).withParcelable("device", device).navigation();
    }

    public static void gotoTimePath() {
        ARouter.getInstance().build(timePath).navigation();
    }

    public static void gotoCreateTimePath(int position) {
        ARouter.getInstance().build(createTimePath).withInt("position", position).navigation();
    }

    public static void gotoFirmwareUpdatePath() {
        ARouter.getInstance().build(firmwareUpdatePath).navigation();
    }

    public static void gotoAddGroupPath() {
        ARouter.getInstance().build(addGroupPath).navigation();
    }


}
